<template>
  <el-tabs v-model="tabActiveName">
    <el-tab-pane label="模板消息" name="tpl">
      <tpl :setting="Setting.message"></tpl>
    </el-tab-pane>
    <el-tab-pane label="订阅消息" name="subscribe">
      <subscribe :setting="Setting.message"></subscribe>
    </el-tab-pane>
    <el-tab-pane label="系统邮箱" name="email">
      <email :setting="Setting.message"></email>
    </el-tab-pane>
  </el-tabs>
</template>

<script>
import Tpl from './components/tpl'
import Subscribe from './components/subscribe'
import Email from './components/email'
export default {
  name: 'Message',
  components: {
    Tpl,
    Subscribe,
    Email
  },
  data() {
    return {
      tabActiveName: 'tpl',
      Setting: {}
    }
  },
  mounted() {
    this.getSetting()
  },
  methods: {
    getSetting() {
      this.$get('setting')
        .then((res) => {
          this.Setting = res.data.data
        })
    }
  }
}
</script>

<style scoped>

</style>
